#ifndef DATCAPISALDI_H
#define DATCAPISALDI_H

#include "tempiritornol.h"
#include "specparaml.h"
#include "specdesignl.h"
#include "fl_ntcstg.h"
#include "fl_ntctpg.h"

#include "abstractmodule.h"

class DatCapisaldi:
        virtual public AbstractModule
{
public:
    DatCapisaldi();
    ~DatCapisaldi();

    bool get ( TempiRitornoL*& p_sls_l ) const;
    bool get (   SeismicGrid*& p_seg   ) const;
    bool get (    SpecParamL*& p_spd_l ) const;
    bool get (   SpecDesignL*& p_sdd_l ) const;
    bool get (     fl_NtcStg*& p_stg   ) const;
    bool get (     fl_NtcTpg*& p_tpg   ) const;

    // Overridding for [FileBased]
    virtual ExaFileErr fileSave (const string& file_name) const;
    virtual ExaFileErr fileOpen (const string& file_name);
    virtual ExaFileObj  fileObj ( void ) const;

    // Overridding for [SavingState]
    virtual void    save ( void );
    virtual void restore ( void );

    // Overridding of [AbstractModule]    
    virtual void    resetModule ( void );                // = 0;
    virtual ExaModuleObj getModuleDat ( void ) const;    

    // Overridding of [DlgBased]
    virtual  int   dlgExec ( void );

protected:
    // overridding of [AbstractDat]
    virtual bool    installDat ( void ); // = 0;
    virtual bool  uninstallDat ( void ); // = 0;

private:           
    TempiRitornoL* m_sls_l;   // lista degli stati limite sismici
       SpecParamL* m_spd_l;   // lista dei parametri spettrali
      SpecDesignL* m_sdd_l;   // lista degli spettri di progetto
      SeismicGrid* m_p_grid;  // griglia sismica
        fl_NtcStg* m_ntc_stg; // stratigrafia
        fl_NtcTpg* m_ntc_tpg; // topografia

      SeismicGrid  m_p_grid_cache;
        fl_NtcStg  m_ntc_stg_cache;
        fl_NtcTpg  m_ntc_tpg_cache;

    static        int m_jet_created; // for [AbstractDat]
    static ExaFileObj m_file_obj;    // for [FileBased]

    QDialog *m_ui;                   // for [DlgBased]
};

#endif // DATCAPISALDI_H
